package com.style_transfer.service.impl;

import com.style_transfer.dao.LocationDao;
import com.style_transfer.model.Image;
import com.style_transfer.model.Location;
import com.style_transfer.service.LocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LocationServiceImpl implements LocationService {
    @Autowired
    private LocationDao locationDao;

    @Override
    public Location getLocationByID(int l_id) {
        return locationDao.getLocationByID(l_id);
    }

    @Override
    public Location getLocationByName(String l_name) { return locationDao.getLocationByName(l_name);}

    @Override
    public List<Location> getAllLocation() {
        return locationDao.getAllLocation();
    }

    @Override
    public List<Image> getAllLocationByParent(int parent) {
        return locationDao.getAllLocationByParent(parent);
    }
}
